package com.wmh.baseservice.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2021-12-31
 */
@ApiModel(value="UsAddress对象", description="用户地址表")
public class UsAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "用户id")
    private Long usId;
    @ApiModelProperty(value = "详细地址")
    private String address;
    @ApiModelProperty(value = "省")
    private String province;
    @ApiModelProperty(value = "市")
    private String city;
    @ApiModelProperty(value = "区/镇")
    private String area;
    @ApiModelProperty(value = "收货人姓名")
    private String name;
    @ApiModelProperty(value = "联系电话")
    private String phone;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public UsAddress setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getUsId() {
        return usId;
    }

    public UsAddress setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public String getAddress() {
        return address;
    }

    public UsAddress setAddress(String address) {
        this.address = address;
        return this;
    }
    public String getProvince() {
        return province;
    }

    public UsAddress setProvince(String province) {
        this.province = province;
        return this;
    }
    public String getCity() {
        return city;
    }

    public UsAddress setCity(String city) {
        this.city = city;
        return this;
    }
    public String getArea() {
        return area;
    }

    public UsAddress setArea(String area) {
        this.area = area;
        return this;
    }
    public String getName() {
        return name;
    }

    public UsAddress setName(String name) {
        this.name = name;
        return this;
    }
    public String getPhone() {
        return phone;
    }

    public UsAddress setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public UsAddress setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsAddress setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String US_ID = "us_id";

    public static final String ADDRESS = "address";

    public static final String PROVINCE = "province";

    public static final String CITY = "city";

    public static final String AREA = "area";

    public static final String NAME = "name";

    public static final String PHONE = "phone";

    @Override
    public String toString() {
        return "UsAddress{" +
            "id=" + id +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", usId=" + usId +
            ", address=" + address +
            ", province=" + province +
            ", city=" + city +
            ", area=" + area +
            ", name=" + name +
            ", phone=" + phone +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsAddress.ID
            ,UsAddress.US_ID
            ,UsAddress.ADDRESS
            ,UsAddress.PROVINCE
            ,UsAddress.CITY
            ,UsAddress.AREA
            ,UsAddress.NAME
            ,UsAddress.PHONE
            ,UsAddress.CREATE_TIME
            ,UsAddress.UPDATE_TIME
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}